package main

import (
	"flag"
	"gim/comm"
	"gim/connect"
	log "github.com/golang/glog"
)

func main() {
	s := flag.String("-S", "127.0.0.1:8090", "127.0.0.1:8090") //tcp
	dbh := flag.String("-DBH", "127.0.0.1:6379", "127.0.0.1:6379")//db host
	dbp := flag.String("-DBP", "", "")//db password
	mqh := flag.String("-MQH", "127.0.0.1:6379", "127.0.0.1:6379")//mq host
	mqp := flag.String("-MQP", "", "")//mq password
	sh := flag.String("-SH", "127.0.0.1:8088", "127.0.0.1:8088")//storage host
	
	flag.Parse()
	
	connect.StartConnect(*sh, *dbh, *dbp, *mqh, *mqp, *s)
	
	signalCH := comm.InitSignal()
	comm.HandleSignal(signalCH)
	
	log.Info("connect server start")
}